﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="uc_sea_transport_app.ascx.cs" Inherits="main_uc_sea_transport_app" %>
<%@ Register Assembly="ESWebFramework.I18N" Namespace="ESWebFramework.I18N" TagPrefix="eswf" %>

<script type="text/javascript">
    $(document).ready(function() {
        // Datepicker
        $('#<%=tbVesselBuiltDate.ClientID%>').datepicker({ dateFormat: 'dd/mm/yy' });
        $('#<%=ddlRute.ClientID%>').dropdownchecklist({ width: 195, initialMultiple: false, maxDropHeight: 150 });
        
     })
    
    function UpdateStep3SeaTransport() {
        var Step3Tender = {
            id: $('#<%=tb_SeaPort_app_id.ClientID %>').val(),
            app_id: $('#<%=tb_application_id.ClientID %>').val(),
            level_importance_id : $('#<%=ddlLevelOfImportnce.ClientID %>').val(),
            placement_type_id : $('#<%=ddlPlacementTypes.ClientID %>').val(),
            country_id : $('#<%=ddlDeparture.ClientID %>').val(),
            seaport_id :0,
            universal_type_id : $('#<%=ddlVeselTypes.ClientID %>').val(),
            vessel_build_date : $('#<%=tbVesselBuiltDate.ClientID %>').val(),
            flag_country_id : $('#<%=ddlFlag.ClientID %>').val(),
            clas : $('#<%=tbClass.ClientID %>').val(),
            date_duration : $('#<%=tbVesselBuiltDate.ClientID %>').val(),
            time_duration : $('#<%=tbTimeOfDuration.ClientID %>').val(),
            price : $('#<%=tbPrice.ClientID %>').val(),
            special_conditions_id : $('#<%=ddlSpecualConditionTypes.ClientID %>').val(),
            other_information : $('#<%=tbOtherInformattions.ClientID %>').val(),
            route: $('#<%=ddlRute.ClientID %>').val()
        }

        $('#saving-div').html('<h3><i>Saving...</i></h3>');
        $.ajax
        ({
            url: "webservices/Application.asmx/UpdateStep3SeaTransport",
            data: '{step3: ' + $.toJSON(Step3Tender) + '}',
            dataType: "json",
            async: false,
            contentType: "application/json; charset=utf-8",
            type: "POST",
            complete: function(json1) {
                var c = JSON.parse(json1.responseText);
                var d = JSON.parse(c.d);
                
                    $('#saving-div').html('<h3><i>'+d+'</i></h3>');
                    setTimeout('ClearMessage()', 3000);
            }
        });
        return false;
    }

    function ClearMessage() {
        $('#saving-div').html('');
        window.location.href = window.location.href;
    }

</script>

<asp:HiddenField ID="tb_SeaPort_app_id" runat="server" />
<asp:HiddenField ID="tb_application_id" runat="server" />
<div id="saving-div"></div>
<!--Level of Importance:-->
<div style="clear:both;float:left;width:50%;text-align:left;padding-top:8px;padding-left:12px">
    <eswf:ESi18nLabel ID="ESi18nLabel43" TextReference="level_of_importance" runat="server"></eswf:ESi18nLabel>
</div>
<div style="padding-top:8px;text-align:left;font-weight:bold">
    <asp:Label ID="lblLevelOfImportance"  runat="server" Text=""></asp:Label>
    <asp:DropDownList ID="ddlLevelOfImportnce" Visible="false" runat="server" CssClass="formItem" Width="200px">
    </asp:DropDownList>
</div>

<!--Placement Types:-->
<div style="float:left;clear:both;width:50%;text-align:left;padding-top:8px;padding-left:12px">
    <eswf:ESi18nLabel ID="ESi18nLabel45" TextReference="placement_type" runat="server"></eswf:ESi18nLabel>
</div>
<div style="padding-top:8px;text-align:left;font-weight:bold">
<asp:Label ID="lblPlacementType" runat="server" Text=""></asp:Label>
<asp:DropDownList ID="ddlPlacementTypes" Visible="false" runat="server" CssClass="formItem" Width="200px">
    </asp:DropDownList>
</div>

<!--Departure:-->
<div style="clear: both; float: left; width: 50%; text-align: left; padding-top: 8px;padding-left: 12px">
   
    <eswf:ESi18nLabel ID="ESi18nLabel2" TextReference="departure" runat="server"></eswf:ESi18nLabel>
</div>
 <div style="padding-top: 8px; text-align: left; font-weight: bold">
     <asp:Label ID="lblDeparture" runat="server" Text=""></asp:Label>
    <asp:DropDownList ID="ddlDeparture" Visible="false" runat="server" CssClass="formItem" Width="202px">
    </asp:DropDownList>
</div>

<!--vesel_types-->
<div style="clear: both; float: left; width: 50%; text-align: left; padding-top: 8px;padding-left: 12px">
   
    <eswf:ESi18nLabel ID="ESi18nLabel8" TextReference="vessel_type" runat="server"></eswf:ESi18nLabel>
</div>
<div style="padding-top: 8px; text-align: left; font-weight: bold">
    <asp:Label ID="lblVeselTypes" runat="server" Text=""></asp:Label>
   <asp:DropDownList ID="ddlVeselTypes" Visible="false" runat="server" CssClass="formItem" Width="202px">
    </asp:DropDownList>
</div>
<!--vessel_built_date-->
<div style="clear: both; float: left; width: 50%; text-align: left; padding-top: 8px;padding-left: 12px">
   
    <eswf:ESi18nLabel ID="ESi18nLabel7" TextReference="vessel_built_date" runat="server"></eswf:ESi18nLabel>
    </div>
<div style="padding-top: 8px; text-align: left; font-weight: bold">
   <asp:Label ID="lblVesselBuiltDate" runat="server" Text=""></asp:Label>
   <asp:TextBox ID="tbVesselBuiltDate" Visible="false" MaxLength="40"  Width="200px" CssClass="formItem" runat="server"></asp:TextBox>  
</div>
<!--Port Of Register-->
<div style="clear: both; float: left; width: 50%; text-align: left; padding-top: 8px;padding-left: 12px">
   
    <eswf:ESi18nLabel ID="ESi18nLabel6" TextReference="port_of_register" runat="server"></eswf:ESi18nLabel>
    </div>
<div style="padding-top: 8px; text-align: left; font-weight: bold">
     <asp:Label ID="lblPortOfRegister" runat="server" Text=""></asp:Label>
   <asp:TextBox ID="tbPortOfRegister" Visible="false" MaxLength="40"  Width="200px" CssClass="formItem" runat="server"></asp:TextBox>   
</div>
<!--Flag:-->
<div style="clear: both; float: left; width: 50%; text-align: left; padding-top: 8px;padding-left: 12px">
   
    <eswf:ESi18nLabel ID="ESi18nLabel9" TextReference="flag" runat="server"></eswf:ESi18nLabel>
    </div>
<div style="padding-top: 8px; text-align: left; font-weight: bold">
     <asp:Label ID="lblFlag" runat="server" Text=""></asp:Label>
    <asp:DropDownList ID="ddlFlag" Visible="false" runat="server" CssClass="formItem" Width="202px">
    </asp:DropDownList>   
</div>
<!--Class-->
<div style="clear: both; float: left; width: 50%; text-align: left; padding-top: 8px;padding-left: 12px">
   
    <eswf:ESi18nLabel ID="ESi18nLabel10" TextReference="class" runat="server"></eswf:ESi18nLabel>
    </div>
<div style="padding-top: 8px; text-align: left; font-weight: bold">
    <asp:Label ID="lblClass" runat="server" Text=""></asp:Label>
   <asp:TextBox ID="tbClass" Visible="false" MaxLength="40"  Width="200px" CssClass="formItem" runat="server"></asp:TextBox>
</div>

<!--time_of_duration-->
<div style="clear: both; float: left; width: 50%; text-align: left; padding-top: 8px;padding-left: 12px">
   
    <eswf:ESi18nLabel ID="ESi18nLabel12" TextReference="time_of_duration" runat="server"></eswf:ESi18nLabel>
    </div>
  <div style="padding-top: 8px; text-align: left; font-weight: bold">
    <asp:Label ID="lblTimeOfDuration" runat="server" Text=""></asp:Label>
   <asp:TextBox ID="tbTimeOfDuration" Visible="false" MaxLength="40"  Width="200px" CssClass="formItem" runat="server"></asp:TextBox>
   <asp:DropDownList ID="ddl_time_period" Visible="false" runat="server" CssClass="formItem" Width="82px"></asp:DropDownList>
   
</div>
<!--Rute:-->
<div style="clear: both; float: left; width: 50%; text-align: left; padding-top: 8px;padding-left: 12px">
   
    <eswf:ESi18nLabel ID="ESi18nLabel13" TextReference="rute" runat="server"></eswf:ESi18nLabel>
    </div>
 <div style="padding-top: 3px; text-align: left; font-weight: bold">
    <table border="0"><tr><td><asp:Label ID="lblRute" runat="server" Text=""></asp:Label></td></tr></table>
    <asp:DropDownList ID="ddlRute" Visible="false" runat="server" CssClass="formItem" Width="202px">
    </asp:DropDownList>
    
</div>
<!--Price-->
<div style="clear: both; float: left; width: 50%; text-align: left; padding-top: 8px;padding-left: 12px">
   
    <eswf:ESi18nLabel ID="ESi18nLabel16" TextReference="price" runat="server"></eswf:ESi18nLabel>
    </div>
    <div style="padding-top: 8px; text-align: left; font-weight: bold">
    <asp:Label ID="lblPrice" runat="server" Text=""></asp:Label>
    <asp:TextBox ID="tbPrice" MaxLength="40" Visible="false" Width="200px" CssClass="formItem" runat="server"></asp:TextBox>
    <asp:DropDownList ID="ddlPrice" runat="server" Visible="false" CssClass="formItem" Width="82px">
    </asp:DropDownList> 
   
</div>
<!--special_condition-->
<div style="clear: both; float: left; width: 50%; text-align: left; padding-top: 8px;padding-left: 12px">
   
    <eswf:ESi18nLabel ID="ESi18nLabel17" TextReference="special_condition" runat="server"></eswf:ESi18nLabel>
 </div>
<div style="padding-top: 8px; text-align: left; font-weight: bold">
     <asp:Label ID="lblSpecualConditionTypes" runat="server" Text=""></asp:Label>
    <asp:DropDownList ID="ddlSpecualConditionTypes" runat="server" Visible="false" CssClass="formItem" Width="202px">
    </asp:DropDownList>
</div>

<!--Other Info-->
<div style="clear: both; float: left; width: 50%; text-align: left; padding-top: 8px;padding-left: 12px">
    <eswf:esi18nlabel id="ESi18nLabel48" textreference="other_informattions" runat="server"></eswf:esi18nlabel>
</div>
<div style="padding-top: 8px; text-align: left; font-weight: bold">
    <asp:Label ID="lblOtherInfo" runat="server" Text=""></asp:Label>
    <asp:TextBox ID="tbOtherInformattions" TextMode="MultiLine" Visible="false" Height="100px" Width="200px" CssClass="formItem" runat="server"></asp:TextBox>
</div>
 <div style="clear:both; text-align:right;width:700px;padding-right:30px;">
      <input type="button" id="btn_UpdateTechicalInfo45" visible="false" value="Save" onclick="UpdateStep3SeaTransport()" runat="server" class="btn_add_more" />
</div>

